import Vue from "vue";
import App from "./App.vue";

import router from "./router";// 引入路由
import { api } from "./api"; // 引入api
import { UIplugins } from "./common/UIplugins"; // 引入封装UI插件全局挂载等
import { util } from "./common/util"; // 引入全局工具类
import { config } from "./config"; // 引入全局设置
import { store } from "./store"; // 引入vuex状态管理

import { Toast } from 'vant';
Vue.use(Toast);

//挂载到Vue实例上面
Vue.prototype.$api = api;
Vue.prototype.$UIplugins = UIplugins; 
Vue.prototype.$util = util;
Vue.prototype.$config = config; 

  // 是否调用vconsole
  if(store.getters.getDebugSetting.vconsole){
    let Vconsole = require("vconsole");
    let vConsole = new Vconsole();
  }
  // 是否引入假数据
  if (store.getters.getDebugSetting.mode && store.getters.getDebugSetting.mode == 1) {
    require("./mock");
  }

Vue.config.productionTip = false;

const vm = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

export default vm;